<?php

	echo "<h1><font color = 'red'> Giỏ hàng của bạn </font></h1>";
			echo '<table border = "1px" cellspacing = "0">';
			echo '<th>Tên tour</th>';
			echo '<th>Giá</th>';
			echo '<th>Số lượng </th>';
			echo '<th>Tổng tiền</th>';
			foreach($_SESSION['cart'] as $id_tour_i => $quantity_q){
				$sql = "select chuyendi.*,tour.ten_tour from chuyendi,tour where id_tour = '$id_tour_i' ";
				$result = mysql_query($sql);
				$rows = mysql_fetch_assoc($result);
				echo '<tr>';
				echo "<td align = 'center'>$rows[ten_tour]</td>";
				echo "<td align = 'center'>$rows[gia]</td>";
				echo "<td align = 'center'><input type = 'text' name = '$id_tour_i' value = '$quantity_q' size ='2' /></td>";
				$total_prices = $rows['gia']*$quantity_q ;
				echo "<td align = 'center'>$total_prices</td>";
				echo '</tr>';
			}
			$total_prices_tour = $_SESSION['total_prices'];
			echo '<tr>';
			echo "<td colspan ='3'></td>";
			echo "<td align = 'center'> $total_prices_tour </td>";
			echo '</tr>';
			echo '<tr>';
			echo "<td align = 'center'  colspan = '4'>
				<input type ='hidden' name = 'save' />
				</td>";
			echo '</tr>';
			echo '<tr>';
			echo "<td align = 'center'  colspan = '4'>
				<input type ='hidden' name = 'thanhtoan' />
				</td>";
			echo '</tr>';
			echo '</table>';
		
			if($id_tour){
				echo '<a href = "index.php"> Tiếp tục đặt tour </a>';
			}
			else
				
			
		
			

?>